package cn.getech.data.metadata.entity.meta;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import lombok.Data;

@Data
@TableName(value = "collection_table_field_log")
public class CollectionTableFieldLog implements Serializable {
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 日志id
     */
    @TableField(value = "log_id")
    private Long logId;

    /**
     * 表id
     */
    @TableField(value = "table_id")
    private Integer tableId;

    /**
     * 字段id
     */
    @TableField(value = "field_id")
    private Integer fieldId;

    /**
     * 0 表 1 字段
     */
    @TableField(value = "data_type")
    private Integer dataType;

    /**
     * 0 新增 1 修改 2 删除 3 未变化
     */
    @TableField(value = "log_type")
    private Integer logType;

    /**
     * 变化信息 string->int,是否分区 是-> 否
     */
    @TableField(value = "change_info")
    private String changeInfo;

    private static final long serialVersionUID = 1L;
    public CollectionTableFieldLog(){

    }
    public CollectionTableFieldLog(Long logId, Integer tableId, Integer fieldId, Integer dataType, Integer logType, String changeInfo) {
        this.logId = logId;
        this.tableId = tableId;
        this.fieldId = fieldId;
        this.dataType = dataType;
        this.logType = logType;
        this.changeInfo = changeInfo;
    }
}